package com.sonicvision.resourcetracker.employee;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.validation.constraints.Size;

import org.hibernate.validator.constraints.Email;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.format.annotation.DateTimeFormat;

@Entity
@SequenceGenerator(name = "employeeIdGenerator", sequenceName = "employee_id_seq", allocationSize = 1)
@Table(name = "employee")
public class Employee {

	@Id
	@Column(name = "employee_id")
	@GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "employeeIdGenerator")
	private int employeeId;

	@NotEmpty
	@Column(name = "first_name")
	private String firstName;

	@NotEmpty
	@Column(name = "last_name")
	private String lastName;

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Column(name = "date_of_birth")
	private Date dob;

	//@Max(11)
	private String ssn;

	@Column(name = "home_phone_number")
	private String homePhone;

	@Column(name = "cell_phone_number")
	private String cellPhone;

	@Email(message = "Invalid Email Address")
	@Column(name = "email_address")
	private String emailAddress;

	@Column(name = "work_authorization_status")
	private String workAuthorizationStatus;

	@Column(name = "drivers_license_number")
	private String driversLicenseNumber;

	@Size(max = 2)
	@Column(name = "drivers_license_state")
	private String driversLicenseState;

	@Column(name = "willing_to_relocate")
	private String willingToRelocate;

	@Column(name = "intended_job_location_city")
	private String intendedJobLocationCity;

	@Size(max = 2)
	@Column(name = "intended_job_location_state")
	private String intendedJobLocationState;

	@Column(name = "highest_level_education")
	private String highestLevelOfEducation;

	@Column(name = "years_of_experience")
	private int yearsOfExperience;

	@DateTimeFormat(pattern = "yyyy-MM-dd")
	@Column(name = "date_of_availability")
	private Date dateOfAvailability;

	@Column(name = "target_job_role")
	private String targetJobRole;

	@Column(name = "expected_pay_rate")
	private int expectedPayRate;

	public Employee() {
		super();
	}

	public int getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(int employeeId) {
		this.employeeId = employeeId;
	}

	public String getFirstName() {
		return firstName;
	}

	public void setFirstName(String firstName) {
		this.firstName = firstName;
	}

	public String getLastName() {
		return lastName;
	}

	public void setLastName(String lastName) {
		this.lastName = lastName;
	}

	public Date getDob() {
		return dob;
	}

	public void setDob(Date dob) {
		this.dob = dob;
	}

	public String getSsn() {
		return ssn;
	}

	public void setSsn(String ssn) {
		this.ssn = ssn;
	}

	public String getHomePhone() {
		return homePhone;
	}

	public void setHomePhone(String homePhone) {
		this.homePhone = homePhone;
	}

	public String getCellPhone() {
		return cellPhone;
	}

	public void setCellPhone(String cellPhone) {
		this.cellPhone = cellPhone;
	}

	public String getEmailAddress() {
		return emailAddress;
	}

	public void setEmailAddress(String emailAddress) {
		this.emailAddress = emailAddress;
	}

	public String getWorkAuthorizationStatus() {
		return workAuthorizationStatus;
	}

	public void setWorkAuthorizationStatus(String workAuthorizationStatus) {
		this.workAuthorizationStatus = workAuthorizationStatus;
	}

	public String getDriversLicenseNumber() {
		return driversLicenseNumber;
	}

	public void setDriversLicenseNumber(String driversLicenseNumber) {
		this.driversLicenseNumber = driversLicenseNumber;
	}

	public String getDriversLicenseState() {
		return driversLicenseState;
	}

	public void setDriversLicenseState(String driversLicenseState) {
		this.driversLicenseState = driversLicenseState;
	}

	public String getWillingToRelocate() {
		return willingToRelocate;
	}

	public void setWillingToRelocate(String willingToRelocate) {
		this.willingToRelocate = willingToRelocate;
	}

	public String getIntendedJobLocationCity() {
		return intendedJobLocationCity;
	}

	public void setIntendedJobLocationCity(String intendedJobLocationCity) {
		this.intendedJobLocationCity = intendedJobLocationCity;
	}

	public String getIntendedJobLocationState() {
		return intendedJobLocationState;
	}

	public void setIntendedJobLocationState(String intendedJobLocationState) {
		this.intendedJobLocationState = intendedJobLocationState;
	}

	public String getHighestLevelOfEducation() {
		return highestLevelOfEducation;
	}

	public void setHighestLevelOfEducation(String highestLevelOfEducation) {
		this.highestLevelOfEducation = highestLevelOfEducation;
	}

	public int getYearsOfExperience() {
		return yearsOfExperience;
	}

	public void setYearsOfExperience(int yearsOfExperience) {
		this.yearsOfExperience = yearsOfExperience;
	}

	public Date getDateOfAvailability() {
		return dateOfAvailability;
	}

	public void setDateOfAvailability(Date dateOfAvailability) {
		this.dateOfAvailability = dateOfAvailability;
	}

	public String getTargetJobRole() {
		return targetJobRole;
	}

	public void setTargetJobRole(String targetJobRole) {
		this.targetJobRole = targetJobRole;
	}

	public int getExpectedPayRate() {
		return expectedPayRate;
	}

	public void setExpectedPayRate(int expectedPayRate) {
		this.expectedPayRate = expectedPayRate;
	}

}
